<html>
<head>
    <meta charset="utf-8">
    <title>明细</title>
    <#include "/pubHeadStyle.html">
</head>
<body>
    <form class="layui-form" action="" lay-filter="workflowDetail">
        <div style="position: relative; padding-right: 6px">
            <div class="layui-form-item detail-form-item">
                <label class="layui-form-label detailLable">任务名称：</label>
                <div class="layui-input-block detailInput">
                    <input type="text" name="taskName" value="${exe.taskName}"  autocomplete="off" class="layui-input" readonly="readonly" />
                </div>
            </div>
            <div class="layui-form-item detail-form-item">
                <label class="layui-form-label detailLable">创建时间：</label>
                <div class="layui-input-block detailInput">
                    <input type="text" name="createTime" value="${exe.createTime?string('yyyy-MM-dd hh:mm:ss')}"  autocomplete="off" class="layui-input" readonly="readonly" />
                </div>
            </div>
            <div class="layui-form-item detail-form-item">
                <label class="layui-form-label detailLable">被代理人：</label>
                <div class="layui-input-block detailInput">
                    <input type="text" name="ownerName" value="${exe.ownerName}"  autocomplete="off" class="layui-input" readonly="readonly"
                           style="cursor: pointer; color: #1E9FFF"/>
                </div>
            </div>

            <div class="layui-form-item detail-form-item">
                <label class="layui-form-label detailLable">承接人：</label>
                <div class="layui-input-block detailInput">
                    <input type="text" name="assigneeName" value="${exe.assigneeName}"  autocomplete="off" class="layui-input" readonly="readonly"
                           style="cursor: pointer;color: #1E9FFF" />
                </div>
            </div>
            <div class="layui-form-item detail-form-item">
                <label class="layui-form-label detailLable">原因备注：</label>
                <div class="layui-input-block detailInput">
                    <input type="text" name="memo" value="${exe.memo}"  autocomplete="off" class="layui-input" readonly="readonly" />
                </div>
            </div>
            <div class="layui-form-item detail-form-item">
                <label class="layui-form-label detailLable">状态：</label>
                <div class="layui-input-block detailInput">
                    <input type="text" name="status"   autocomplete="off" class="layui-input" readonly="readonly"
                    <#if exe.status==0 >
                        value="转办" style="color:green"
                    <#elseif exe.status==1 >
                        value="完成任务" style="color:green"
                    <#elseif exe.status==2 >
                        <#if exe.assignType==1>
                            value="取消代理" style="color:red"
                        </#if>
                        <#if exe.assignType==2>
                            value="取消转办" style="color:red"
                        </#if>
                    <#elseif exe.status==3 >
                        value="其他" style="color:green"
                    </#if>
                    />
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div style="text-align: center;position: absolute; bottom: 15px;width: 100%">
                <button type="reset" id="closeWindow" class="layui-btn btn-n layui-btn-danger btn-save">关闭</button>
            </div>
        </div>
    </form>

    <script>
        layui.config({
            base: serverPath.systemPath + staticPath.systemPath //静态资源所在路径
        }).extend({
            index: 'index' //主入口模块
        }).use(['index','setter','element','form'], function () {
            var setter = layui.setter
                , element = layui.element
                , $ = layui.$
                , form = layui.form;
            // 被代理人详情
            var ownerId = '${exe.ownerId}';
            $("[name='ownerName']").on('click',function () {
                parent.layer.open({
                    type: 2,
                    title: '人员详细信息',
                    area: ['938px', '620px'],
                    resize:false,
                    content: serverPath.systemPath + setter.sysLinkPath + 'sysUser/view/view?userId='+ownerId
                });
            });
            //授权人详情
            var assigneeId = '${exe.assigneeId}';
            $("[name='assigneeName']").on('click',function () {
                parent.layer.open({
                    type: 2,
                    title: '人员详细信息',
                    area: ['938px', '620px'],
                    resize:false,
                    content: serverPath.systemPath + setter.sysLinkPath + 'sysUser/view/view?userId='+assigneeId
                });
            });

            $('#closeWindow').click(function () {
                parent.layer.close(parent.layer.getFrameIndex(window.name))
            })

        })
    </script>
</body>
</html>